package org.chench.test.helloserviceclient.controller;

import org.chench.test.helloserviceclient.service.HelloClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloClientController {
    @Autowired
    HelloClientService helloClientService;

    @GetMapping("/hello")
    public String hi(@RequestParam("name") String name) {
        return helloClientService.sayHello(name);
    }
}
